The real VHPT insertion is done based on the machine PTE returned from
translate_domain_pte, which does the appropriate offset calculations.
However, the insertion into the one-entry TLB uses the original PTE, but
the page size has been reset to PAGE_SIZE [1]. Thus the entry in the
one-entry TLB incorrectly maps the PAGE_SIZE sub-page which was faulted
on to the PAGE_SIZE sub-page at the bottom of the superpage.
I think it makes most sense to simply use the original itir when
inserting into the single-entry TLB, as per attached patch. I've moved
the vcpu_set_tr_entry calls up a level into vcpu_itc_d and vcpu_itc_i;
the third caller previously used the 4 flag to specify "don't do that".
[1] In fact, this is enforced twice, once in translate_domain_pte and
again in vcpu_itc_no_srlz.
Signed-off-by: Matthew Chapman <matthewc@cse.unsw.edu.au> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
[IA64] Resolve a race in tlb_track_search_and_remove()
When tlb_track_search_and_remove() is about to remove a found entry,
another cpu might update p2m entry and insert the entry right before that.
It must be aware of it.
This patch makes the logic in setup_guest() more clear.
domain_translate_gpfn_list() is now gone, so we can make
memory initializtion code simple.
Xend passes memory size which is a sum of normal memory
size and GFW memory to QEMU and Libxc. This patch fixes
this issue.
Ian Campbell [Wed, 10 Jan 2007 09:39:24 +0000 (09:39 +0000)]
[PATCH] kexec/kdump: remove unnecessary incusion of asm/fixmap.h
I think this a legacy of an older revision of this code,
but asm/fixmap.h does not seem to be needed in
asm-x86/x86_32/kexec.h or asm-x86/x86_64/kexec.h
That is, neither of these incarntations of kexec.h seem
to do anything related to fixmap directly or indirectly.
Ewan Mellor [Tue, 9 Jan 2007 17:25:28 +0000 (17:25 +0000)]
This simple patch allows domains created in the xm-test suite to be
created as managed domains using either a parameter to the
XenTestDomain() constructor or by setting the environment variable
XM_MANAGED_DOMAINS and running the tests with it.
[XEN] Emulate DAA/DAS the hard way. We cannot execute the instruction
directly within the emulator as it is unavailable if the emulator runs
in x86/64 mode. Signed-off-by: Keir Fraser <keir@xensource.com>
Tim Deegan [Tue, 9 Jan 2007 16:49:16 +0000 (16:49 +0000)]
[HVM] Remove unnecessary write barriers
Using a volatile pointer saves us from the compier reordering these
writes, and the processor won't let them appear out of order. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Tue, 9 Jan 2007 13:24:45 +0000 (13:24 +0000)]
When booting via xm, only run the bootloader if it's in non-interactive mode:
otherwise we lose the user's named kernel and try to bootload the temporary
file pygrub returned.
Tim Deegan [Tue, 9 Jan 2007 13:24:40 +0000 (13:24 +0000)]
Pass in kernel/ramdisk settings to pygrub; if specified, don't try to use
grub.conf; this allows hands-off bootloading in the absence of a grub.conf.
It's also useful for specifying temporary changes etc.
Tim Deegan [Mon, 8 Jan 2007 14:24:30 +0000 (14:24 +0000)]
[HVM] Add expansion-ROM boot support again.
Boot info now stored at 0x9ff00; registers saved in HDD load code. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
[linux build] Build Linux kernels with output files in a separate directory.
Use a single source tree (linux-2.6-xen) and use Linux' O= option to
make the build put output files in a
build-linux-$(LINUX_VER)-$(EXTRAVERSION)_$(XEN_TARGET_ARCH) directory,
making it possible to build both x86_32 and x86_64 kernels in the same
tree.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
[TOOLS] Improve information displayed by the xm sched-credit command.
The improvement is as follows.
1. The display form is changed like the xm sched-sedf command.
2. When -d option is omitted, information on all domains is
displayed.
Examples:
# xm sched-credit -d vm1
Name ID Weight Cap
vm1 1 512 100
# xm sched-credit
Name ID Weight Cap
Domain-0 0 256 0
vm1 1 512 100
vm2 2 512 50
Enable compatibility mode operation for HYPERVISOR_domctl. Also add logic
to switch a domain to/from compatibility mode (supposed to happen early
after domain creation only).
Enable compatibility mode operation for HYPERVISOR_memory_op,
HYPERVISOR_update_descriptor, HYPERVISOR_update_va_mapping. This also
introduces infrastructure to do argument translation.
Adjust emulation code to deal with compatibility mode guests. This
includes enhancements to emulate_privileged_op() that aren't directly
related to such guests.
Handle the creation of startup info for compatibility mode guests. This
includes a script to auto-generate checking or translation code between
native and compatibility mode hypercall argument structures.
Add logic to generate headers reflecting the compatibility mode layout
of hypercall arguments. Provide infrastructure for accessing handles
passed from compatibility mode guests. Vector those hypercalls not
needing any translation to their native implementations.
Introduce _DOMF_compat and infrastructure as well as several conditionals
dealing with operations that need to distinguish between native and
compatibility mode guests.
Tim Deegan [Fri, 5 Jan 2007 16:28:42 +0000 (16:28 +0000)]
[HVM] Sync the base memory reported by ROMBIOS with the e820 map.
This stops Etherboot relocating itself onto the SMBIOS tables. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Fix prefix handling to ignore misplaced REX bytes and to grok both
kinds of REP prefix properly. These fixes are from Jan Beulich
<jbeulich@novell.com>.
Ewan Mellor [Fri, 5 Jan 2007 15:51:39 +0000 (15:51 +0000)]
Added session.last_active field. Removed the constructors and destructors for
session and task classes -- these are implicitly added and removed, so we
should not have explicit constructors and destructors for them.
Xen 3.0.3 pre-pended all configuration prior to the user-specified
args in the boot cmdline. Restore this behaviour to fix
incompatabilities with fragile parsers in some domU kernels.
[XEN] Add LEA to the Xen x86 emulator. Rename x86_emulate_memop() to
x86_emulate(), as the emulator now does more than emulation of
'special' memory accesses. Signed-off-by: Keir Fraser <keir@xensource.com>